package com.xxgc.springboot.util;

import com.baomidou.mybatisplus.core.toolkit.AES;

/**
 * @program: springboot
 * @description:
 * @author: Mr.abel(ShiJiaYi)
 * @create: 2022-09-14 15:54
 **/
public class DataSourceUtil {
    //d3712db8caa9b52c  key 加密钥匙
    public static void main(String[] args) {
        String key = "d3712db8caa9b52c";
        //url
        String data = "123456";
        // 生成 16 位随机 AES 密钥
        //String randomKey = AES.generateRandomKey();
        //System.out.println("randomKey = " + randomKey);
        // 随机密钥加密
        String result = AES.encrypt(data, key);
        System.out.println("result = " + result);
    }
}
